package com.hsjk.szwj.module.train.api;

import com.hsjk.szwj.module.train.api.dto.StudentInfoDTO;
import com.hsjk.szwj.module.train.convert.StudentConvert;
import com.hsjk.szwj.module.train.dal.mysql.student.IStudentInfoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/09/05 00:01
 **/
@Service
public class StudentApiImpl implements IStudentApi {
    @Resource
    private IStudentInfoMapper studentInfoMapper;

    @Override
    public int createStudentInfo(StudentInfoDTO dto) {
        return studentInfoMapper.insert(StudentConvert.INSTANCE.convertStudentInfoDO(dto));
    }
}
